<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">
</head>
<body>
    <div th:insert="~{common/header::header2}"></div>
    <div class="container-fluid">
        <div class="row">
            <div th:insert="~{common/menu::menu}" class="col-md-2"></div>
            <div class="col-md-10">
                <ul class="breadcrumb">
                    <li><a th:href="@{/main.do}">后台主页</a></li>
                    <li>新闻数据管理</li>
                    <li>新闻更新</li>
                </ul>
                <form th:action="@{/news-info/update.do}">
                    <div>
                        <input type="hidden" name="newsId" th:value="${news.getNewsId()}">
                    </div>
                    <div class="form-group row justify-content-sm-center">
                        <label for="newsTitle" class="col-sm-2 col-form-label font-weight-bold">新闻标题</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control " id="newsTitle" th:value="${news.getNewsTitle()}" name="newsTitle">
                        </div>
                    </div>
                    <div class="form-group row justify-content-sm-center">
                        <label class="col-sm-2 col-form-label font-weight-bolder">发布范围</label>
                        <div class="col-sm-5">
                            <select class="form-control" name="cityId">
                                <option th:value="100000000">全国</option>
                                <option th:value="100110000">北京</option>
                                <option th:value="100120000">天津</option>
                                <option th:value="100130000">河北</option>
                                <option th:value="100140000">山西</option>
                                <option th:value="100150000">内蒙古</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row justify-content-sm-center">
                        <label for="newsContent" class="col-sm-2 col-form-label font-weight-bold">新闻内容</label>
                        <div class="col-sm-5">
                            <textarea class="form-control" id="newsContent" th:text="${news.getNewsContent()}" name="newsContent" rows="3" required> </textarea>
                        </div>
                    </div>
                    <div class="form-group row justify-content-sm-center">
                        <label for="userName" class="col-sm-2 col-form-label font-weight-bold">发布机构</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="userName" th:value="${news.getUserName()}" name="userName">
                        </div>
                    </div>
                    <div class="form-group row justify-content-sm-center">
                        <div class="col-sm-1">
                            <button class="btn btn-sm btn-success" type="submit">提交</button>
                        </div>
                        <div class="col-sm-1">
                            <button  class="btn btn-sm btn-primary"><a style="color: white" th:href="@{/news-info/show.do}" >取消</a></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
<script th:src="@{/jquery/jquery-3.5.1.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.zh-CN.min.js}"></script>
</html>